# Measuring Interethnic Marriage in Africa

This repository contains replication code for "Measuring Interethnic Marriage in Africa" by Daniel N. Posner in Political Science Research & Methods (2026). It was last updated on the 5th of February 5th, 2026.

## Author

Codebase built and maintained by Branden Bohrnsen (bohrnsen@umich.edu). Please reach out with any issues or questions! The package was created with R 4.5.2 using Positron IDE on Fedora Workstation 43.

## Requirements

### Software Requirements

- Packages specified in `renv` snapshot
- Project created on R 4.5.2

### Data Requirements

You will need to obtain the following data files:

1. **IPUMS Census Data**
   - Zambian census microdata for 2000 and 2010
   - Required variables: YEAR, SERIAL, PERNUM, URBAN, SEX, GEOLEV1, GEOLEV2, CONSTZM, MIGYRS1, AGE, AGEMARR, ETHNICZM, SPLOC, POLYMAL, MARST
   - Download from: [IPUMS International](https://international.ipums.org/)
   - Expected file: `data/ipums/ipumsi_00003.xml` (DDI file) and corresponding data file, rename if needed

2. **DHS Survey Data**
   - Zambia DHS Couples' Recode files for 1996, 2001-02, and 2013-14
   - Download from: [DHS Program](https://dhsprogram.com/)
   - Expected files:
     - `data/dhs/Zambia1996/ZMCR31DT/ZMCR31FL.DTA`
     - `data/dhs/Zambia2001-02/ZMCR42DT/ZMCR42FL.DTA`
     - `data/dhs/Zambia2013-14/Couples' Recode/ZMCR61FL.DTA`

## Execution Order

Run the master script:

**00_run_all.R**

Otherwise, the scripts run in numerical order.
